package com.juc.callable.callable4;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class TestCallableNoInterrupted {

	public static void main(String[] args) throws InterruptedException {
		MyCallableNoInterrupted myCallable =new MyCallableNoInterrupted();
		ExecutorService executorService = new ThreadPoolExecutor(50, Integer.MAX_VALUE, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<Runnable>());
		Future<String> future = executorService.submit(myCallable);
		Thread.sleep(100);
		System.out.println(future.cancel(true) + "    " + future.isCancelled());

	}
}
